package org.blankie.util;

import java.util.Collection;

public interface OrganizationManager<O extends Organized,
                                     N extends Organized,
                                     L extends Organized> {

    Collection<L> getLeaves(Organized managed);

    void getLeaves(Organized managed, Collection<? super L> into);

    Collection<N> getNodes(Organized managed);

    void getNodes(Organized managed, Collection<? super N> into);

    O getOrganization(Organized managed);

    N getParent(Organized managed);

    N getRoot(Organized managed);

    boolean hasLeaves(Organized managed);

    boolean hasNodes(Organized managed);

    boolean isLeaf(Organized object);

    boolean isNode(Organized object);

    boolean isOrganization(Organized object);

    boolean isRoot(Organized object);

}
